#!/usr/bin/env python
# coding=utf-8
from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^apps/', include('apps.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # (r'^admin/(.*)', admin.site.root),
    (r'^account/create/?$', 'apps.cataccountbook.views.account_handler', {'action':'create'}),
    (r'^account/edit/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.account_handler', {'action':'edit'}),
    (r'^account/delete/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.account_handler', {'action':'delete'}),
    (r'^account/view/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.account_handler', {'action':'get'}),
    (r'^category/create/?$', 'apps.cataccountbook.views.category_handler', {'action':'create'}),
    (r'^category/edit/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.category_handler', {'action':'edit'}),
    (r'^category/delete/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.category_handler', {'action':'delete'}),
    (r'^category/view/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.category_handler', {'action':'get'}),
    (r'^record/create/?$', 'apps.cataccountbook.views.record_handler', {'action':'create'}),
    (r'^record/edit/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.record_handler', {'action':'edit'}),
    (r'^record/delete/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.record_handler', {'action':'delete'}),
    (r'^record/view/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.record_handler', {'action':'get'}),
    (r'^transaction/create/?$', 'apps.cataccountbook.views.transaction_handler', {'action':'create'}),
    (r'^transaction/edit/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.transaction_handler', {'action':'edit'}),
    (r'^transaction/delete/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.transaction_handler', {'action':'delete'}),
    (r'^transaction/view/(?P<object_id>[^/]+)$', 'apps.cataccountbook.views.transaction_handler', {'action':'get'}),        
    (r'^debug/?$', 'apps.cataccountbook.views.debug'),
    (r'^$', 'apps.cataccountbook.views.debug')
)
